package body v8.Class_Function is


   function New_Instance
     (this : Function_T
     ) return Pointer
   is
      function Invoke
        (this : Function_T
        ) return Pointer;
      pragma Import (CPP, Invoke, "_ZNK2v88Function11NewInstanceEv");
   begin
      return Invoke (this);
   end New_Instance;
   pragma Inline (New_Instance);

   function New_Instance
     (this : Function_T;
      args : v8.Class_Value.Value_Array
     ) return Pointer
   is

      function Invoke
        (this : Function_T;
         argc : Integer;
         argv : v8.Class_Value.Value_Array
        ) return Pointer;
      pragma Import (CPP, Invoke, "_ZNK2v88Function11NewInstanceEiPNS_6HandleINS_5ValueEEE");
   begin
      return Invoke (this, args'Length, args);
   end New_Instance;
   pragma Inline (New_Instance);


   function Call
     (this : in out Function_T;
      recv : v8.Class_Object.Pointer;
      args : v8.Class_Value.Value_Array
     ) return v8.Class_Value.Pointer
   is
      function Invoke
        (this : in out Function_T;
         recv : v8.Class_Object.Pointer;
         argc : Integer;
         argv : v8.Class_Value.Value_Array
        ) return v8.CLass_Value.Pointer;

      pragma Import (CPP, Invoke, "_ZN2v88Function4CallENS_6HandleINS_6ObjectEEEiPNS1_INS_5ValueEEE");
   begin
      return Invoke (this, recv, args'Length, args);
   end Call;
   pragma Inline (Call);

end v8.Class_Function;
